#include <jni.h>
#include <iostream>
// This is the java header created using the javah -jni command.
#include "br_inf_ufrgs_usixml360_logicconector_csharp_CSharpLogicConector.h"

// This is the Managed C++ header that contains the call to the C#
#include "CSharpLogicConector.h"

JNIEXPORT void JNICALL Java_br_inf_ufrgs_usixml360_logicconector_csharp_CSharpLogicConector_executeMethod
(JNIEnv *, jobject){
	
	CSharpLogicConectorC* lc = new CSharpLogicConectorC();
	lc->executeMethod();
}

/*
 * Class:     br_inf_ufrgs_usixml360_logicconector_csharp_CSharpLogicConector
 * Method:    getMethodReturnDouble
 * Signature: ()D
 */
JNIEXPORT jdouble JNICALL Java_br_inf_ufrgs_usixml360_logicconector_csharp_CSharpLogicConector_getMethodReturnDouble
(JNIEnv *, jobject){

	CSharpLogicConectorC* lc = new CSharpLogicConectorC();
	return lc->getMethodReturnDouble();
}

/*
 * Class:     br_inf_ufrgs_usixml360_logicconector_csharp_CSharpLogicConector
 * Method:    getMethodReturnInteger
 * Signature: ()I
 */
JNIEXPORT jint JNICALL Java_br_inf_ufrgs_usixml360_logicconector_csharp_CSharpLogicConector_getMethodReturnInteger
(JNIEnv *, jobject){
	CSharpLogicConectorC* lc = new CSharpLogicConectorC();
	return lc->getMethodReturnInteger();
}

/*
 * Class:     br_inf_ufrgs_usixml360_logicconector_csharp_CSharpLogicConector
 * Method:    getMethodReturnString
 * Signature: ()Ljava/lang/String;
 */
JNIEXPORT jstring JNICALL Java_br_inf_ufrgs_usixml360_logicconector_csharp_CSharpLogicConector_getMethodReturnString
(JNIEnv *env, jobject){
	CSharpLogicConectorC* lc = new CSharpLogicConectorC();
	const char *result = lc->getMethodReturnString();

	return env->NewStringUTF (result);
}

/*
 * Class:     br_inf_ufrgs_usixml360_logicconector_csharp_CSharpLogicConector
 * Method:    prepareMethodDoubleParameter
 * Signature: (DI)V
 */
JNIEXPORT void JNICALL Java_br_inf_ufrgs_usixml360_logicconector_csharp_CSharpLogicConector_prepareMethodDoubleParameter
(JNIEnv *, jobject, jdouble parameter, jint position){
	CSharpLogicConectorC* lc = new CSharpLogicConectorC();
	lc->prepareMethodDoubleParameter(parameter,position);
}

/*
 * Class:     br_inf_ufrgs_usixml360_logicconector_csharp_CSharpLogicConector
 * Method:    prepareMethodIntegerParameter
 * Signature: (II)V
 */
JNIEXPORT void JNICALL Java_br_inf_ufrgs_usixml360_logicconector_csharp_CSharpLogicConector_prepareMethodIntegerParameter
(JNIEnv *, jobject, jint parameter, jint position){
	CSharpLogicConectorC* lc = new CSharpLogicConectorC();
	lc->prepareMethodIntegerParameter(parameter,position);
}

/*
 * Class:     br_inf_ufrgs_usixml360_logicconector_csharp_CSharpLogicConector
 * Method:    prepareMethodName
 * Signature: (Ljava/lang/String;)V
 */
JNIEXPORT void JNICALL Java_br_inf_ufrgs_usixml360_logicconector_csharp_CSharpLogicConector_prepareMethodName
(JNIEnv *env, jobject, jstring name){
	CSharpLogicConectorC* lc = new CSharpLogicConectorC();
	
	jboolean iscopy;
	const char* cString = env->GetStringUTFChars(name,&iscopy);

	lc->prepareMethodName(cString);
}

/*
 * Class:     br_inf_ufrgs_usixml360_logicconector_csharp_CSharpLogicConector
 * Method:    prepareMethodClass
 * Signature: (Ljava/lang/String;)V
 */
JNIEXPORT void JNICALL Java_br_inf_ufrgs_usixml360_logicconector_csharp_CSharpLogicConector_prepareMethodClass
(JNIEnv *env, jobject, jstring name){
	CSharpLogicConectorC* lc = new CSharpLogicConectorC();

	jboolean iscopy;
	const char* cString = env->GetStringUTFChars(name,&iscopy);

	lc->prepareMethodClass(cString);
}

/*
 * Class:     br_inf_ufrgs_usixml360_logicconector_csharp_CSharpLogicConector
 * Method:    prepareMethodStringParameter
 * Signature: (Ljava/lang/String;I)V
 */
JNIEXPORT void JNICALL Java_br_inf_ufrgs_usixml360_logicconector_csharp_CSharpLogicConector_prepareMethodStringParameter
(JNIEnv *env, jobject, jstring parameter, jint position){
	CSharpLogicConectorC* lc = new CSharpLogicConectorC();

	jboolean iscopy;
	const char* cString = env->GetStringUTFChars(parameter,&iscopy);

	lc->prepareMethodStringParameter(cString,position);
}

/*
 * Class:     br_inf_ufrgs_usixml360_logicconector_csharp_CSharpLogicConector
 * Method:    prepareMethodDoubleReturnParameter
 * Signature: ()V
 */
JNIEXPORT void JNICALL Java_br_inf_ufrgs_usixml360_logicconector_csharp_CSharpLogicConector_prepareMethodDoubleReturnParameter
(JNIEnv *, jobject){
	CSharpLogicConectorC* lc = new CSharpLogicConectorC();
	lc->prepareMethodDoubleReturnParameter();
}

/*
 * Class:     br_inf_ufrgs_usixml360_logicconector_csharp_CSharpLogicConector
 * Method:    prepareMethodIntegerReturnParameter
 * Signature: ()V
 */
JNIEXPORT void JNICALL Java_br_inf_ufrgs_usixml360_logicconector_csharp_CSharpLogicConector_prepareMethodIntegerReturnParameter
(JNIEnv *, jobject){
	CSharpLogicConectorC* lc = new CSharpLogicConectorC();
	lc->prepareMethodIntegerReturnParameter();
}

/*
 * Class:     br_inf_ufrgs_usixml360_logicconector_csharp_CSharpLogicConector
 * Method:    prepareMethodStringReturnParameter
 * Signature: ()V
 */
JNIEXPORT void JNICALL Java_br_inf_ufrgs_usixml360_logicconector_csharp_CSharpLogicConector_prepareMethodStringReturnParameter
(JNIEnv *, jobject){
	CSharpLogicConectorC* lc = new CSharpLogicConectorC();
	lc->prepareMethodStringReturnParameter();
}

/*
 * Class:     br_inf_ufrgs_usixml360_logicconector_csharp_CSharpLogicConector
 * Method:    initializeMethod
 * Signature: ()V
 */
JNIEXPORT void JNICALL Java_br_inf_ufrgs_usixml360_logicconector_csharp_CSharpLogicConector_initializeMethod
(JNIEnv *, jobject){

	CSharpLogicConectorC* lc = new CSharpLogicConectorC();
	lc->initializeMethod();
}

